# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=eog
pkgver=3.26.1
pkgrel=1
pkgdesc="Eye of Gnome: An image viewing and cataloging program"
url="https://wiki.gnome.org/Apps/EyeOfGnome"
arch=(i686 x86_64)
license=(GPL)
depends=(gnome-desktop libexif lcms2 exempi libpeas librsvg dconf)
makedepends=(intltool itstool gobject-introspection gtk-doc gnome-common git)
optdepends=('eog-plugins: Additional features')
groups=(gnome)
options=(!emptydirs)
_commit=8b32d76311453ba9dabe853a3be83e03ba21a6a3  # tags/3.26.1^0
source=("git+https://git.gnome.org/browse/eog#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd "$pkgname"
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --enable-compile-warnings=minimum --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
}
